import { MenuComponent } from './menu.component';
import { Component, OnInit, Input,TemplateRef, Output, EventEmitter, ChangeDetectionStrategy } from '@angular/core';
import { DomSanitizer, SafeStyle } from '@angular/platform-browser';

@Component({
  selector: 'el-menu-item-group',
  templateUrl: './menu-group.component.html',
  changeDetection: ChangeDetectionStrategy.OnPush,
})
export class MenuGroupComponent implements OnInit {
    rootMenu!: MenuComponent;
    private sanitizer:any;
    titleTmp!: TemplateRef<any>;
    @Input()  title: string = '';
  constructor(rootMenu: MenuComponent, sanitizer: DomSanitizer) {
    this.rootMenu = rootMenu;
        this.sanitizer = sanitizer;
        this.title = '';
   }

  ngOnInit(): void {
    if (!this.title) {
        console.warn('el-menu-item-group required props: [title: string]');
    }
  }


  paddingStyle() {
    return this.sanitizer.bypassSecurityTrustStyle('padding-left: 20px');
  }

 
}
